<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class MY_Controller extends CI_Controller {
    
    public $tpl         = 'template_admin';
    public $tpl_admin   = 'template_admin';
    
    public function __construct()
    {
        parent::__construct();
        
		#$this->output->enable_profiler(TRUE);
		$data = array(
			'benchmarks'		=> FALSE,
			'uri_string' 		=> FALSE, 
			'post' 				=> FALSE, 
			'memory_usage' 		=> FALSE, 
			'get' 				=> FALSE, 
			'controller_info' 	=> FALSE, 
			'session_data' 		=> FALSE, 
			'config' 			=> FALSE, 
			'http_headers' 		=> FALSE
		);
		$this->output->set_profiler_sections($data);
		
		$this->load->model('website_model');
    }
    
    // ------------------------------------------------------------------------
    
	public function response($success, $action = '', $text = '', $text2 = '')
	{
		$response['success'] = $success;
		
		if ($action)
		{
			$response['action'] = $action;
			
			if ($text) $response['text'] = $text;
			if ($text2) $response['text2'] = $text2;
		}

		header('Content-type: application/json');
		
		echo json_encode($response);
		exit;
	}
	
	// ------------------------------------------------------------------------
	
	public function log_action($process = '', $action = '')
	{
		$this->auth->log_action($process, $action);
	}
	
	// ------------------------------------------------------------------------
}

/* End of file my_controller.php */
/* Location: ./application/core/my_controller.php */